<div class="jxksbmk" style="height: 100%;width:100%;overflow:auto;">
    <div class="button-group-head" style="">
        <span class="hrp-btn hrp-btn-add" id="caculate-jj"><i class="fa fa-plus" style="padding-right: 4px;"></i>奖金计算</span>
        <span class="hrp-btn hrp-btn-edit"><i class="fa fa-edit" style="padding-right: 4px;"></i>修改</span>
        <span class="hrp-btn hrp-btn-delete"><i class="fa fa-close" style="padding-right: 4px;"></i>删除</span>
        <span  class="hrp-btn hrp-btn-refresh"><i class="fa fa-refresh" style="padding-right: 4px;"></i>刷新</span>
    </div>
    <div class="jxkhzbk-toolbar">

        <span style="padding-top: 4px;height: 40px;float: right;padding-right: 20px;">
            <input id="cc" name="dept">
        </span>
        <span style="height:40px;line-height: 40px;float: right;padding-right: 5px;font-size:14px;">科室类别:</span>
    </div>
    <div>
        <table id="dg" class="easyui-datagrid" style="width:100%;">
            <!--<thead>-->
            <!--<tr>-->
            <!--<th  width="15%">Item ID(15%)</th>-->
            <!--<th  width="15%">Product(15%)</th>-->
            <!--<th  width="15%">List Price(15%)</th>-->
            <!--<th  width="15%">List Price(15%)</th>-->
            <!--<th width="15%">List Price(15%)</th>-->
            <!--</tr>-->
            <!--</thead>-->
        </table>
    </div>
</div>
<script type="text/javascript">


    var dHeight = $(".jxksbmk").height()-82;

    var UserIndexPage={
        init:function () {
            this.initEvnets();
            //this.initGrid();
            this.initZblb();
        },
        initEvnets:function () {
            $(window).resize(function () {
                $('#dg').datagrid("resize")
            })
            $("#caculate-jj").on("click",function () {

                var zqid =  $('#cc').combobox("getValue");
                alert(zqid)

                $.post("/lcjj/caculateJJ",{"zqid":zqid},function (result) {
                    if(result.status==200){
                        $.messager.show({title: '提示', msg: '奖金计算成功', timeout: 1000, showType: 'slide'});
                    }
                })
            })
        },
        initZblb:function () {
            var that = this;
            $('#cc').combobox({
                url:"common/getKhzqList",
                valueField:'id',
                textField:'text',
                onSelect:function (record) {
                    that.initGrid(record.id);
                },
                onLoadSuccess:function () {

                }
            });
        },
        initGrid:function (zqid) {
            $('#dg').datagrid({
                url: "common/getLcjj",
                queryParams: {
                    zqid: zqid
                },
                //pagination: true,
                singleSelect: true,
                height:dHeight,   //表格高度，可指定高度，可自动
                //pageNumber: 1,
                //pageSize: 15,
                //pageList: [15, 30],
                fitColumns:true,
                loadMsg: "正在加载数据",
                nowrap: false,
                striped: true,  //奇偶行是否使用不同的颜色
                frozenColumns:[
                    [
                        {field:'jxksmc',title:'科室名称',width:"100"}

                    ]
                ],
                columns:[
                    [

                        {field:'wzcyrc',title:'危重出院人次',width:"140"},
                        {field:'mjzzcf',title:'门急诊诊查费',width:"140"},
                        {field:'ssgzl',title:'手术工作量',width:"140"},
                        {field:'hssr',title:'核算收入',width:"140"},
                        {field:'hszc',title:'核算支出',width:"140"},
                        {field:'cwr',title:'床位日',width:"140"},
                        {field:'cyrc',title:'入院人次',width:"140"},
                        {field:'hlf',title:'护理费',width:"140"},
                        {field:'byylsrzcb',title:'百元医疗收入支出比',width:"140"},
                        {field:'jyzcjlxs',title:'节约支出奖励系数',width:"140"},
                        {field:'cwrdwjx',title:'床位日单位绩效',width:"140"},
                        {field:'cydwjx',title:'出院单位绩效',width:"140"},
                        {field:'wzcydwjx',title:'危重出院单位绩效',width:"140"},
                        {field:'mzgzldwjx',title:'门诊工作量单位绩效',width:"140"},
                        {field:'ssgzldwjx',title:'手术工作量单位绩效',width:"140"},
                        {field:'jzgzldwjx',title:'急诊工作量单位绩效',width:"140"},
                        {field:'cbjyjx',title:'成本节约绩效',width:"140"},
                        {field:'cwrjx',title:'床位日绩效',width:"140"},
                        {field:'cyjx',title:'出院绩效',width:"140"},
                        {field:'wzcyjx',title:'危重出院绩效',width:"140"},
                        {field:'mzgzljx',title:'门诊工作量绩效',width:"140"},
                        {field:'ssgzljx',title:'手术工作量绩效',width:"140"},
                        {field:'resultValue',title:'总绩效',width:"140"}

                    ]
                ]

            });

        }
    }
    $(function () {
        UserIndexPage.init();
    })
</script>